Switching power supplies generate an output voltage on the secondary side of a transformer by switching the current flow through the primary side of the transformer. A simple control method for switching power supplies is the on/off control, wherein switching is based on a control loop between the primary and secondary sides of the transformer. The on/off control does not need control loop compensation, but rather only needs one comparator to close the loop. If the output voltage is below a reference voltage measured by the comparator, switching is enabled, which increases the output voltage. When the output voltage is greater than the reference voltage, switching is disabled, which causes the output voltage to decrease. In some embodiments, the switching frequency and the duty cycle of the switching are fixed and each time the output voltage exceeds the reference voltage, switching is disabled.